package com.vdong.common.oauth.common.enums;

/**
 *
 */
public enum WechatAuthorTypeEnum {
    /**
     * 未授权
     */
    UNAUTHORIZED("未授权", 0),

    /**
     * 已授权
     */
    AUTHORIZED("已授权", 1),
    ;

    private String state;
    private Integer value;

    private WechatAuthorTypeEnum(String state, Integer value) {
        this.state = state;
        this.value = value;
    }

    public static WechatAuthorTypeEnum getEnum(Integer value) {
        for (WechatAuthorTypeEnum requisitionConstant : WechatAuthorTypeEnum.values()) {
            if (requisitionConstant.getValue().equals(value)) {
                return requisitionConstant;
            }
        }
        return null;
    }

    public Integer getValue() {
        return value;
    }

    public String getState() {
        return state;
    }
}
